]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Avoid passing 'source' as an argument to Notification::destroy()
authorMarina Zhurakhinskaya <marinaz@redhat.com>
Sun, 30 Jan 2011 23:08:20 +0000 (18:08 -0500)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Sun, 30 Jan 2011 23:53:07 +0000 (18:53 -0500)
Notification::destroy() now takes 'reason' as an optional argument.
Calling Notification::destroy() directly when connecting to 'destroy'
on Source, as we did before, was inadvertently passing 'source' as an
argument to the function.

https://bugzilla.gnome.org/show_bug.cgi?id=640976

js/ui/messageTray.js

index c3eb706f954a5ae037eaf28095c237f5518f221a..81997df0607c2a72e4594e54949def53dd6da5fe 100644 (file)
@@ -274,7 +274,11 @@ Notification.prototype = {
         this._capturedEventId = 0;
         this._keyPressId = 0;
 
-        source.connect('destroy', Lang.bind(this, this.destroy));
+        source.connect('destroy', Lang.bind(this,
+            // Avoid passing 'source' as an argument to this.destroy()
+            function () {
+                this.destroy();
+            }));
 
         this.actor = new St.Table({ name: 'notification',
                                     reactive: true });